package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 创客账户流水(收入支出明细)
 * </p>
 *
 * @author bob
 * @since 2019-01-25
 */
@Data
@Accessors(chain = true)
@TableName("zdd_company_accountflow")
public class CompanyAccountflow extends Model<CompanyAccountflow> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Integer compid;
    /**
     * 业务ID
     */
    private Integer bizid;
    /**
     * 业务子项目ID
     */
    private Integer itemId;

    @ApiModelProperty("支付方式id(表zdd_payment)")
    @TableField("pay_id")
    private Integer payId;

    /**
     * 业务类型: 1.普通项目 2:智众包项目 3:外部项目(嘉银) 4:企业充值 5:企业提现 6:返回智众包保证金 7:转账给创客团账本; 参考: CompanyAccountFlowBizType
     */
    @TableField("biz_type")
    private Integer bizType;
    /**
     * 账户类型 1:九歌统一账户 2:企业自己商户号账户 3:企业的创客团账本 4:支付宝转账账户
     */
    @TableField("account_type")
    private Integer accountType;
    /**
     * 1.收入 2支出
     */
    private Integer flowtype;
    /**
     * 流水名目
     */
    private String flowname;
    /**
     * 流水金额
     */
    @TableField("flow_amount")
    private BigDecimal flowAmount;
    /**
     * 记录前账户余额,用于核对账户
     */
    @TableField("before_balance")
    private BigDecimal beforeBalance;
    /**
     * 记录后账户余额,用于核对账户
     */
    @TableField("curr_balance")
    private BigDecimal currBalance;
    /**
     * 记录前账户冻结余额,用于核对账户
     */
    @TableField("before_frozen_balance")
    private BigDecimal beforeFrozenBalance;
    /**
     * 记录后账户冻结余额,用于核对账户
     */
    @TableField("curr_frozen_balance")
    private BigDecimal currFrozenBalance;
    private Date createtime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
